home *** CD-ROM | disk | FTP | other *** search
- ╒═══════════════════════════════════════════════════════════════════════════╕
- │ CADMOS Computer WorkShop - 26, Skoufa Street, Athens 106 73 │
- │ Phone +30-1- data: 363 5482, 360 6044, 360 6046 (Cadmos/CHAOS BBS) │
- │ voice: 361 1030, 360 6052 FAX: 360 6059 │
- ╘═══════════════════════════════════════════════════════════════════════════╛
-
- READY, Version 5.1, (c) 1989-93, Haris Courouclis, (301) 361 1030
- ─────────────────────────────────────────────────────────────────
-
- FORMAT: READY [options][message]
-
- Options are:
- /A:n Only Accept characters n or ASCII code n
- /A Set ErrorLevel to Ascii value of key pressed (used with /A:n)
- /B Retain keypress in type Buffer (/A switch disregarded)
- /C Display Clock
- /K Keep message line
- /N No message
- /R Message Right justified
- /Red Allow output Redirection (F.e. READY /red >COM1 <COM1)
- /S:n Sound a n Hz beep or delay n msecs (when n<0)
- /T:n Wait n secs for key
- /Z Zap keyboard buffer on entry.
-
- READY displays MESSAGE and waits for a keypress.
-
- To insert special characters (such as the redir. chars <, >, and |), use
- \nnn or \$nn within message, where \nnn is a three digit decimal Ascii
- code while \$nn is a HEX value.
-
- Default MESSAGE is 'hh:mm:ss Press any key when ready ...'
-
- The message line is cleared unless the /K parameter is supplied.
-
- The Ascii Code for the key pressed is recorded in ERRORLEVEL (255 if /B).
-
- If /A:n is specified only keypress with ASCII code n or letters in keylist
- n are accepted. Use -n for Extended Ascii (for example, /A:bC for b and C,
- /A:-59 for F1). The ErrorLevel is set to the order of the key pressed
- within the keylist. If /A is specified along with /A:n, then the ErrorLevel
- is set to the Ascii Code of the key pressed.
-
- If /T:n is specified and no key has been pressed for n seconds, then 0 is
- returned to ERRORLEVEL. If /Red is specified then I/O can be redirected
- from CON to another device (Note: /C can not be used with /RED).
-
- Example:
- (a) print file if y, Y, Space or Enter is pressed, don't print
- if Ctrl-C, Esc, n or N is pressed:
-
- READY Do you want a printout (Y/N)? \060Y\062: /a:3 /a:27 /a:nNyY /a:13 /a:32
- if ErrorLevel 5 goto PRINT ───┬────
- goto END │
- │
- :PRINT │
- print test.xyz │
- │
- :END this will show up as <S>:
-
-
- (b) print file if any key but Ctrl-C, Esc, n or N is pressed:
-
- READY Do you want a printout (Y/N)? \060Y\062:
- if ErrorLevel 3 if not ErrorLevel 4 goto END
- if ErrorLevel 27 if not ErrorLevel 28 goto END
- if ErrorLevel 78 if not ErrorLevel 79 goto END
- if ErrorLevel 110 if not ErrorLevel 111 goto END
- print test.xyz
-
- :END
-
- ┌───────────────────────────────────────────────────────────────────────────┐
- │(c) All rights reserved. Use prohibited in a professional, business or │
- │ commercial environment without prior written licence by the author. │
- │ │
- │ Feel free to copy and distribute this program. You may use it and evaluate│
- │ it for 30 days. After this period, you may only use it while you are a │
- │ subscriber to Cadmos/CHAOS BBS :-) │
- └───────────────────────────────────────────────────────────────────────────┘
-
- Version History Notes:
-
- ver 1.0 First attempt, early '89.
- ver 2.0 Added colors, and clock display
- ver 2.1 Option keywords can be mixed with message words
- ver 2.1a Help can be invoked with /? as well as ?
- ver 2.2 When /n (No message) then do not display time either
- ver 3.0 21.09.90 ReplaceAscii added for \nnn ASCII characters
- ver 3.1 05.10.90 Added BREAK handling
- ver 3.1a 08.10.90 Write ^C instead of chr(3)
- ver 3.1b 16.10.90 ErrorLevel 255 if /B
- ver 3.1c 23.02.91 minor HELP correction
- ver 3.1d 12.03.91 Played with color! (message color was unpredictable)
- ver 3.2 14.07.91 Allow Input/Output redirection
- ver 3.3 31.03.92 READY would limit the parameter line to 79 characters.
- Although this is desirable, the various parameters where also counted
- so the resulting string was often limited to much less characters.
- Now there is a limit of 78 characters for the resulting prompt string
- ONLY when the /r switch is in effect.
- ver 3.4 19.04.92 Fixed the color restoration bug
- ver 3.4a 17.11.92 Added Cadmos/Chaos numbers in HELP
- ver 3.4b 26.12.92 Added TimeOut info if DEBUG=ready
- ver 3.5 27.12.92 Changed TimeStart and TimeEnd calculation.
- 60*60*100*Word produced erroneous results.
- ver 4.0 Same as ver 3.5. The major version digit (4) should have been
- increased since ver 3.5 was a "major bug fix"! Versions prior to
- 3.5 did not, at times, calculate correctly start and present time
- when the /t:n parameter was used. In some cases the timeout value
- was never reached.
- This was due to a Turbo Pascal bug: when a number variable is
- assigned to an expression that involves another variable of lesser
- capacity, the result is bound by the capacity of the lesser
- variable. In READY's case, a TimeOut word variable was calculated
- as the difference of EndTime-StartTime, both LongInt variables.
- Those variables where calculated as 60*60*100*Hour + 60*100*Min +
- 100*Sec + Sec100.
- Hour, Min, Sec and Sec100 get their values from the GetTime
- procedure and are defined ss Word variables. The 60*60*100 was
- bound by the Word variable limits and, as a result, the StartTime
- and EndTime values were wrong. In most of the cases the
- EndTime-StartTime difference was correct, but, in some cases, it
- yielded an erroneous value. In those cases Ready /s:n would not
- work properly. This was corrected in Version 4.0 (3.5).
- ver 4.1 Added the /Z parameter. When used, the keyboard buffer is cleared
- before from any characters that might have been left there before
- READY's prompt appears.
- ver 5.0 When a keylist is specified (with /A:n) the ErrorLevel is now set
- to the order of the key pressed within the keylist. If the new
- switch /A is specified along with /A:n, then the ErrorLevel is set
- to the Ascii Code of the key pressed, just as it did in previous
- versions.
- *>│> WARNING: Since the ErrorLevel is now set by default to the order
- └───────── of the keypressed within the keylist, you will have to
- edit any batch files using the /A:n option that you might
- have written using older versions of READY. A QUICK WAY
- OF DOING THIS IS TO USE THE /A SWITCH WHENEVER THE
- READY /A:n OPTION IS USED.
- ver 5.1 BugFix: the character corresponding to the returned ErrorLevel was
- printed instead of the key pressed!
-
-
- ┌────────────────────────────────────────────────────────────────────────────┐
- │(c) All rights reserved. Use prohibited in a professional, business or │
- │ commercial environment without prior written licence by the author. │
- │ │
- │ Feel free to copy and distribute this program. You may use it and evaluate │
- │ it for 30 days. After this period, you may only use it while you are a │
- │ subscriber to Cadmos/CHAOS BBS :-) │
- └────────────────────────────────────────────────────────────────────────────┘
-